﻿namespace Commander.Core.Commons
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Commander.Core.Interfaces.Shared;
    using Commander.Core.UIs.WinForms;
    using Commander.Core.WorkItems.Panels;
    using Commander.Core.WorkItems.Commands;
    using Commander.Core.WorkItems.Operations;
    using Commander.Core.WorkItems;

    class Bootstrap
    {
        public void Load()
        {
            S<IGuiManager, WinFormGuiManager>();
            S<IStateController, StateController>();
            S<ICommandController, CommandController>();
            S<IOperationManager, OperationManager>();
        }

        private void S<TInterface, TImplementation>(object context = null) where TImplementation : TInterface
        {
            E.Container.SetUp<TInterface, TImplementation>(context);
        }

        private void S(Type interfaceType, Type implementation, object context = null)
        {
            E.Container.SetUp(interfaceType, implementation, context);
        }
    }
}
